package com.niuwa.p2p.core.constant;

/**
 * @title 学籍状态枚举
 *
 * @author 填写作者
 * @version 1.0
 * @created 2015年4月2日
 */
public enum StudentCreditEnum implements IEnum {
	Success(0, "验证成功"), Fail(1, "验证失败"), Net(2, "访问受限"),Other(3, "其它异常");

	private int value;
	private String text;

	private StudentCreditEnum(int value, String text) {
		this.value = value;
		this.text = text;
	}

	@Override
	public int getValue() {
		return this.value;
	}

	@Override
	public String getText() {
		return this.text;
	}

	@Override
	public String toString() {
		return this.getText();
	}

	public static StudentCreditEnum valueOf(int value) {
		for (StudentCreditEnum e : StudentCreditEnum.values()) {
			if (e.getValue() == value) {
				return e;
			}
		}
		return null;
	}

}
